﻿using UnityEngine;
using UnityEngine.UI;
using strange.extensions.mediation.impl;
using strange.extensions.dispatcher.eventdispatcher.api;
using strange.extensions.context.api;

public class BtnView : View 
{
	[Inject(ContextKeys.CONTEXT_DISPATCHER)]
	public IEventDispatcher dispatcher{ get; set;}

	public Text scoreText;
	public void Init()
	{
		scoreText = GameObject.FindObjectOfType<Text>();
	}

	public void ClickBtn()
	{
		dispatcher.Dispatch (MediatorEvent.ClickDown);
	}

	public void UpdateScore(int score)
	{
		scoreText.text = score+"";
	}
}
